package Box2D.Common.Math
{
	import Box2D.Common.b2Wrapper;
	
	public class b2Transform extends b2Wrapper
	{
		private var _position:b2Vec2;
		private var _R:b2Mat22;
		public function b2Transform(wrapper:Object=null)
		{
			if(wrapper==null){
				wrapper = callDirect('b2Transform_new');
			}
			super(wrapper);
			_position = new b2Vec2(0,0,wrapper);
			_R = new b2Mat22(wrapper+8);
		}		
		public function get position():b2Vec2{return _position}
		public function set position(value:b2Vec2):void{
			_position.Copy(value);
		}
		
		public function get R():b2Mat22{return _R}
		public function Copy(source:b2Transform):void{
			call('b2Transform_Copy',source.wrapper);
		}
		public function Clone():b2Transform{
			var result:b2Transform = new b2Transform;
			result.Copy(this);
			return result;
		}
		public function SetIdentity():void{
			call('b2Transform_SetIdentity');
		}
		public function Set(p:b2Vec2,angle:Number):void{
			call('b2Transform_Set',p.wrapper,angle);
		}
		public function GetAngle():Number{
			return call('b2Transform_GetAngle');
		}
	}
}